﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SecureCookie.Implementation.Protocol;

namespace SecureCookie.Implementation.UnitTest.Stub
{
    class StubRequestState : IRequestState
    {
        private Dictionary<string, DateTime> expirations = new Dictionary<string, DateTime>();

        public bool HasExpirationFromIncomingCookie(string cookieName)
        {
            return expirations.ContainsKey(cookieName);
        }

        public DateTime ExpirationFromIncomingCookie(string cookieName)
        {
            return expirations[cookieName];
        }

        public void RegisterExpirationFromIncomingCookie(DateTime dateTime, string cookieName)
        {
            expirations[cookieName] = dateTime;
        }
    }
}
